﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShoppingEntity
{
	/// <summary>
	/// 用户表实体类
	/// </summary>
	public class UserInfo:BaseDeleteEntity
	{
		/// <summary>
		/// 用户账号
		/// </summary>
		[Column(TypeName = "varchar(16)")]
		public string Account { get; set; }
		/// <summary>
		/// 用户名
		/// </summary>
		[Column(TypeName = "nvarchar(16)")]
		public string UserName { get; set; }
		/// <summary>
		/// 手机
		/// </summary>
		[Column(TypeName = "varchar(16)")]
		public string PhoneNum { get; set; }
		/// <summary>
		/// 邮箱
		/// </summary>
		[Column(TypeName = "varchar(32)")]
		public string Email { get; set; }
		/// <summary>
		/// 性别
		/// </summary>
		public int Sex { get; set; }
		/// <summary>
		/// 密码
		/// </summary>
		[Column(TypeName = "varchar(32)")]
		public string PassWord { get; set; }
		/// <summary>
		/// 地址
		/// </summary>
		[Column(TypeName = "varchar(110)")]
		public string Address { get; set; }
		/// <summary>
		/// 余额
		/// </summary>
		[Column(TypeName = "decimal")]
		public decimal Balance { get; set; }

		/// <summary>
		/// 注册时间
		/// </summary>
		public DateTime CreateTime { get; set; }

		/// <summary>
		/// 用户角色
		/// </summary> 
		public UserInfoRoleInfoEnum UserInfoRole { get; set; }

		 
		/// <summary>
		/// 是否为管理员
		/// </summary>
		public bool IsAdmin { get; set; }

		public enum UserInfoRoleInfoEnum
		{
			用户 = 1,
			商家 = 2,
			配送员 = 3,
		}

	}
}
